Design and implementation of a simple typed language based on the lambda-calculus
نویسنده
چکیده
Despite the work of Landin and others as long ago as 1966, almost all recent programming languages are large and difficult to understand. This thesis is a reexamination of the possibility of designing and implementing a small but practical language based on very few primitive constructs. The text records the syntax and informal semantics of a new language called Ponder. The most notable features of the work are a powerful type-system and an efficient implementation of normal order reduction. In contrast to Landin’s ISWIM, Ponder is statically typed, an expedient that increases the simplicity of the language by removing the requirement that operations must be defined for incorrect arguments. The type system is a powerful extension of Milner’s polymorphic type system for ML in that it allows local quantification of types. This extension has the advantage that types that would otherwise need to be primitive may be defined. The criteria for the well-typedness of Ponder programmes are presented in the form of a natural deduction system in terms of a relation of generality between types. A new type checking algorithm derived from these rules is proposed. Ponder is built on the λ-calculus without the need for additional computation rules. In spite of this abstract foundation an efficient implementation based on Hughes’ supercombinator approach is described. Some evidence of the speed of Ponder programmes is included. The same strictures have been applied to the design of the syntax of Ponder, which, rather than having many pre-defined clauses, allows the addition of new constructs by the use of a simple extension mechanism.
منابع مشابه
Simply Easy! An Implementation of a Dependently Typed Lambda Calculus
We present an implementation in Haskell of a dependently-typed lambda calculus that can be used as the core of a programming language. We show that a dependently-typed lambda calculus is no more difficult to implement than other typed lambda calculi. In fact, our implementation is almost as easy as an implementation of the simply typed lambda calculus, which we emphasize by discussing the modif...
متن کاملOn the denotational semantics of XML-Lambda
The article deals with the denotational semantics of a special query language called XML-Lambda (abbreviated as XML-λ), which is based on the simply typed lambda calculus. The exact semantics allows experimentation with a language definition, prototyping of programs, and similar experiments. One of such experiment is the implementation of the XQuery language in the XML-λ environment. The main a...
متن کامل[DRAFT] The Calculus of Dependent Lambda Eliminations∗
Modern constructive type theory is based on pure dependently typed lambda calculus, augmented with user-defined datatypes. This paper presents an alternative called the Calculus of Dependent Lambda Eliminations, based on pure lambda encodings with no auxiliary datatype system. New typing constructs are defined which enable induction, as well as large eliminations with lambda encodings. These co...
متن کاملSimple λΠ-interpreter for matrix computation
This project to extend the simply-typed Lambda calculus λ→ to have types dependent on constant value. In particular this language will be used to check the validity of matrix computation.
متن کاملThe calculus of dependent lambda eliminations
Modern constructive type theory is based on pure dependently typed lambda calculus, augmented with user-defined datatypes. This paper presents an alternative called the Calculus of Dependent Lambda Eliminations, based on pure lambda encodings with no auxiliary datatype system. New typing constructs are defined which enable induction, as well as large eliminations with lambda encodings. These co...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 1984